package com.linux.huhx.stringTest;

import org.junit.Test;

/**
 * Created by huhx on 2017-06-26.
 */
public class WhiteSpaceTest {
    @Test
    public void white_space_test1() {
        String string = "   hello";
        System.out.println(string.length()); // 8
        for (int i = 0; i < string.length(); i++) {
            if (Character.isWhitespace(string.charAt(i))) {
                System.out.println("i = " + i);
            }
        }
    }
}
